//
//  main.m
//  base_m_03
//
//  Created by China Dragon on 2023/1/24.
//

#import <Foundation/Foundation.h>
#import "student.h"

int main(int argc, const char * argv[]) {
    @autoreleasepool {
        student *stu = [[student alloc]init];
//        student *stu = [[[student alloc]init] autorelease];// 自动释放
        //一般使用系统自带的静态方法创建的对象都会自动释放
        [stu setAge:22];
        [stu setNo:10];
        int age = [stu age];
        int no = [stu no];
        NSLog(@"age = %i , no = %i",age,no);
        NSLog(@"%@",stu);
//        [stu release];//https://zhuanlan.zhihu.com/p/364976194
       
    }
    return 0;
}
